// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 此处后端没有提供注释 POST /apibackend/user/add */
export async function addUser(body: API.UserAddRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseLong>('/apibackend/user/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/delete */
export async function deleteUser(body: API.DeleteRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/apibackend/user/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/emaiRegister */
export async function userEmailRegister(
  body: API.UserRegisterRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong>('/apibackend/user/emaiRegister', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /apibackend/user/get */
export async function getUserById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserByIdParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseUserVO>('/apibackend/user/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /apibackend/user/get/login */
export async function getLoginUser(options?: { [key: string]: any }) {
  return request<API.BaseResponseLoginUserVO>('/apibackend/user/get/login', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/getEmailCaptcha */
export async function getEmailCaptcha(
  body: API.EmailCaptchaRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseString>('/apibackend/user/getEmailCaptcha', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /apibackend/user/key */
export async function getKey(options?: { [key: string]: any }) {
  return request<API.BaseResponseUserDevKeyVO>('/apibackend/user/key', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /apibackend/user/list */
export async function listUser(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUserParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListUserVO>('/apibackend/user/list', {
    method: 'GET',
    params: {
      ...params,
      userQueryRequest: undefined,
      ...params['userQueryRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /apibackend/user/list/page */
export async function listUserByPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUserByPageParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageUserVO>('/apibackend/user/list/page', {
    method: 'GET',
    params: {
      ...params,
      userQueryRequest: undefined,
      ...params['userQueryRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/login */
export async function userLogin(body: API.UserLoginRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseLoginUserVO>('/apibackend/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/logout */
export async function userLogout(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/apibackend/user/logout', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/posttest */
export async function psottest(body: string, options?: { [key: string]: any }) {
  return request<string>('/apibackend/user/posttest', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/regenerationKey */
export async function regenerationKey(options?: { [key: string]: any }) {
  return request<API.BaseResponseUserDevKeyVO>('/apibackend/user/regenerationKey', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/register */
export async function userRegister(
  body: API.UserRegisterRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong>('/apibackend/user/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /apibackend/user/test */
export async function test(options?: { [key: string]: any }) {
  return request<string>('/apibackend/user/test', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /apibackend/user/update */
export async function updateUser(body: API.UserUpdateRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/apibackend/user/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
